const Message = require("../services/Message");

module.exports = async function (req, res, proceed){
    console.log("拦截器执行")
    // const token = req.headers.authorization.split(" ").pop()
    console.log(req.session.authenticated)
    if(req.session.authenticated){
        // 认证信息存放的是登录的账户地址
        return proceed()
    }
    return res.json(Message.response(403, "未登录", null))
}